package com.example.everying.mapper.content;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.everying.model.entity.ActivityRating;
import com.example.everying.model.entity.content.ActivityArticle;
import com.example.everying.model.vo.content.ActivityArticleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动评价Mapper接口
 */
@Mapper
public interface ActivityRatingMapper extends BaseMapper<ActivityRating> {
    /**
     * 查询我发布的待评价活动（保持与publishSelect相同返回结构）
     */
    IPage<ActivityArticleVo> selectPublishedToRate(Page<ActivityArticleVo> pageParam, @Param("currentUserId") String currentUserId);

    /**
     * 查询我参与的待评价活动（同样结构）
     */
    IPage<ActivityArticleVo> selectParticipatedToRate(Page<ActivityArticleVo> pageParam, @Param("currentUserId") String currentUserId);

    int selectParticipatedToRateCount(@Param("currentUserId") String currentUserId);

    int selectPublishedToRateCount(@Param("currentUserId") String currentUserId);

    List<ActivityArticle> selectPublishedListToRate(@Param("currentUserId") String currentUserId);

    List<ActivityArticle> selectParticipatedListToRate(@Param("currentUserId") String currentUserId);


}